# Contributor: Galen Abell <galen@galenabell.com>
# Maintainer: Galen Abell <galen@galenabell.com>
pkgname=py3-aiostream
_pyname=aiostream
pkgver=0.6.4
pkgrel=0
pkgdesc="Generator-based operators for asynchronous iteration"
url="https://github.com/vxgmichel/aiostream"
arch="noarch"
license="GPL-3.0-only"
depends="python3 py3-typing-extensions"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-pytest-asyncio py3-pytest-cov"
subpackages="$pkgname-pyc"
source="$_pyname-$pkgver.tar.gz::https://github.com/vxgmichel/aiostream/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --system-site-packages testenv
	testenv/bin/python3 -m installer dist/*.whl
	testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		dist/*.whl
}
sha512sums="
6c26afb017fb4322b2d381fc4c82060d3b5a71c352b275e36b83192464c434c68a060247db740fc2f745a735c3407503932378185cd46c4c56f1286c5bfae62d  aiostream-0.6.4.tar.gz
"
